home *** CD-ROM | disk | FTP | other *** search
- #ifndef ConsLaw_h_IS_INCLUDED
- #define ConsLaw_h_IS_INCLUDED
- #include <FieldFD.h>
- #include <TimePrm.h>
- #include <FieldFunc.h>
-
- // initial condition (function body in ConsLaw.C):
- extern real start1 (const Ptv(real)& x, real t = DUMMY);
- // flux function (function body in ConsLaw.C):
- extern real linearFlux (real u);
- typedef real (*Flux)(real u); // flux function pointer
-
- class ConsLaw
- {
- Handle(GridLattice) grid; // lattice grid (here: 1D grid)
- Handle(FieldFD) u; // solution at time step n+1
- Handle(FieldFD) u_prev; // solution at time step n
- TimePrm tip; // time integration parameters (delta t etc.)
- SetOfNo(real) time_points_for_plot; // time points for making plots
- Flux f; // flux function, Flux is a function ptr
- CurvPlotFile file; // for plotting results
-
- public:
- ConsLaw () {}
- ~ConsLaw () {}
- void init ();
- void solveProblem ();
- };
- #endif
-